package com.csu.device.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * 初始化redis数据
 */
@Component
@Order(1)
public class InitDataService implements CommandLineRunner {

    @Autowired
    private HardWareService hardWareService;

    @Override
    public void run(String... strings) throws Exception {
        //加载硬件设备数据
        hardWareService.initDeviceData(null);
        System.out.println("OJBK");
    }
}
